package com.example.mybatisplus.model.domain;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.io.Serializable;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author yfy
 * @since 2021-12-30
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "HOrder对象", description = "")
public class HOrder extends Model<HOrder> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "评论主键")
    private Long cId;

    @ApiModelProperty(value = "酒店主键")
    private Long hId;

    @ApiModelProperty(value = "用户主键")
    private Long uId;

    @ApiModelProperty(value = "房间详情主键")
    private Long dId;

    @ApiModelProperty(value = "退房主键")
    private Long outId;

    @ApiModelProperty(value = "下单状态")
    private Integer oState;

    @ApiModelProperty(value = "支付状态")
    private Integer pState;

    @ApiModelProperty(value = "入住状态")
    private Integer inState;

    @ApiModelProperty(value = "退房状态")
    private Integer outState;

    @ApiModelProperty(value = "退款状态")
    private Integer back;

    @ApiModelProperty(value = "入住人数")
    private Integer inNum;

    @ApiModelProperty(value = "入住时间")
    private LocalDate inTime;

    @ApiModelProperty(value = "退房时间")
    private LocalDate outTime;

    @ApiModelProperty(value = "下单时间")
    private LocalDateTime orTime;

    private BigDecimal price;
    private String username;
    @TableField(exist = false)
    private User user;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
